import type { ResponseDataRoot } from '@/global/root_type'

// 创建订单
export interface ICreateOrder extends ResponseDataRoot {
  data: number
}
// 根据orderId获取订单详情

export interface IOrderInfoData {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    orderStatusString: string
  }
  userId: number
  outTradeNo: string
  hoscode: string
  hosname: string
  depcode: string
  depname: string
  scheduleId: string
  title: string
  reserveDate: string
  reserveTime: number
  patientId: number
  patientName: string
  patientPhone: string
  hosRecordId: string
  number: number
  fetchTime: string
  fetchAddress: string
  amount: number
  quitTime: string
  orderStatus: number
}
export interface IOrderInfo extends ResponseDataRoot {
  data: IOrderInfoData
}
// 取消订单

export interface ICancelOrder extends ResponseDataRoot {
  data: boolean
}
// 微信支付二维码
export interface IWXPay {
  codeUrl: string
  orderId: number
  totalFee: number
  resultCode: string
}
export interface IWXPayErcode extends ResponseDataRoot {
  data: IWXPay
}
// 订单 支付状态
export interface IPayResultStatus extends ResponseDataRoot {
  data: boolean
}
// 订单列表
// 订单分页类型
export interface IOrderConfig {
  page: number
  limit: number
  patientId?: string
  orderStatus?: string
}
export interface IUserOrderListDataContent {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    orderStatusString: string
  }
  userId: number
  outTradeNo: string
  hoscode: string
  hosname: string
  depcode: string
  depname: string
  scheduleId?: any
  title: string
  reserveDate: string
  reserveTime: number
  patientId: number
  patientName: string
  patientPhone: string
  hosRecordId: string
  number: number
  fetchTime: string
  fetchAddress: string
  amount: number
  quitTime: string
  orderStatus: number
}
export type IUserOrderListDataArr = IUserOrderListDataContent[]
export interface IUserOrderListData {
  records: IUserOrderListDataArr
  total: number
  size: number
  current: number
  orders: any[]
  hitCount: boolean
  searchCount: boolean
  pages: number
}
export interface IUserOrderList extends ResponseDataRoot {
  data: IUserOrderListData
}

// 订单状态
export interface IOrderStatusData {
  comment: string
  status: number
}
export type IOrderStatusDataArr = IOrderStatusData[]
export interface IOrderStatus extends ResponseDataRoot {
  data: IOrderStatusDataArr
}
